Optimal. Leaf size=51 \[ -\frac {(a+2 b) \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {a \cot (e+f x) \csc (e+f x)}{2 f}+\frac {b \sec (e+f x)}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3664, 455, 388, 207} \[ -\frac {(a+2 b) \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {a \cot (e+f x) \csc (e+f x)}{2 f}+\frac {b \sec (e+f x)}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 207
Rule 388
Rule 455
Rule 3664
Rubi steps
\begin {align*} \int \csc ^3(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x^2 \left (a-b+b x^2\right )}{\left (-1+x^2\right )^2} \, dx,x,\sec (e+f x)\right )}{f}\\ &=-\frac {a \cot (e+f x) \csc (e+f x)}{2 f}-\frac {\operatorname {Subst}\left (\int \frac {-a-2 b x^2}{-1+x^2} \, dx,x,\sec (e+f x)\right )}{2 f}\\ &=-\frac {a \cot (e+f x) \csc (e+f x)}{2 f}+\frac {b \sec (e+f x)}{f}+\frac {(a+2 b) \operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sec (e+f x)\right )}{2 f}\\ &=-\frac {(a+2 b) \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {a \cot (e+f x) \csc (e+f x)}{2 f}+\frac {b \sec (e+f x)}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.05, size = 123, normalized size = 2.41 \[ -\frac {a \csc ^2\left (\frac {1}{2} (e+f x)\right )}{8 f}+\frac {a \sec ^2\left (\frac {1}{2} (e+f x)\right )}{8 f}+\frac {a \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )}{2 f}-\frac {a \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )}{2 f}+\frac {b \sec (e+f x)}{f}+\frac {b \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )}{f}-\frac {b \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.65, size = 124, normalized size = 2.43 \[ \frac {2 \, {\left (a + 2 \, b\right )} \cos \left (f x + e\right )^{2} - {\left ({\left (a + 2 \, b\right )} \cos \left (f x + e\right )^{3} - {\left (a + 2 \, b\right )} \cos \left (f x + e\right )\right )} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + {\left ({\left (a + 2 \, b\right )} \cos \left (f x + e\right )^{3} - {\left (a + 2 \, b\right )} \cos \left (f x + e\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) - 4 \, b}{4 \, {\left (f \cos \left (f x + e\right )^{3} - f \cos \left (f x + e\right )\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.56, size = 76, normalized size = 1.49 \[ -\frac {a \cot \left (f x +e \right ) \csc \left (f x +e \right )}{2 f}+\frac {a \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2 f}+\frac {b}{f \cos \left (f x +e \right )}+\frac {b \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.46, size = 76, normalized size = 1.49 \[ -\frac {{\left (a + 2 \, b\right )} \log \left (\cos \left (f x + e\right ) + 1\right ) - {\left (a + 2 \, b\right )} \log \left (\cos \left (f x + e\right ) - 1\right ) - \frac {2 \, {\left ({\left (a + 2 \, b\right )} \cos \left (f x + e\right )^{2} - 2 \, b\right )}}{\cos \left (f x + e\right )^{3} - \cos \left (f x + e\right )}}{4 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 12.10, size = 95, normalized size = 1.86 \[ \frac {a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{8\,f}-\frac {\frac {a}{2}-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {a}{2}+8\,b\right )}{f\,\left (4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\right )}+\frac {\ln \left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )\,\left (\frac {a}{2}+b\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tan ^{2}{\left (e + f x \right )}\right ) \csc ^{3}{\left (e + f x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________